package org.eenie.appseed.ui.dialog

import org.eenie.appseed.databinding.ActivityDialogDemoBinding
import org.eenie.appseed.ui.dialog.sub.DemoBottomDialogFragment
import org.eenie.appseed.ui.dialog.sub.DemoBottomSheetDialogFragment
import org.eenie.appseed.ui.dialog.sub.DemoDialogFragment
import org.eenie.core.base.viewbinding.BaseBindingActivity
import org.eenie.core.ext.onClick

class DialogDemoActivity : BaseBindingActivity<ActivityDialogDemoBinding>() {
    override fun providerBinding() = ActivityDialogDemoBinding.inflate(layoutInflater)

    override fun initUI() {
        binding.apply {
            btnShow.onClick {
                DemoDialogFragment.newInstance().show(supportFragmentManager, "demo")
            }

            btnShowBottom.onClick {
                DemoBottomDialogFragment.newInstance().show(supportFragmentManager, "bottom")
            }

            btnShowSheet.onClick {
                DemoBottomSheetDialogFragment.newInstance().show(supportFragmentManager, "sheet")
            }
        }

    }

}